When a host device writes data to and reads data from a storage device, the host writes and reads data in terms of logical block addresses (LBAs), each of which is mapped to 512 bytes (or some other predetermined length) of physical memory. However, a Flash Transfer Layer (FTL) or Media Management Layer (MML) of the storage device manages the data in terms logical groups (LGs) in the flash (non-volatile) memory of the storage device, in order to limit control structure overhead. These LGs are further broken into sub-LGs, which can also be referred to as flash management units (FMUs), with each of the FMUs typically being mapped to 4096 bytes of physical memory. In such a configuration, each of the FMUs can include or correspond to 4096 bytes that are separated into eight 512 byte logical sub-units, with each of the logical sub-units having a corresponding LBA that can be used by the host device to address the logical sub-unit. An FMU is the minimal addressable logical unit of memory that can be addressed. Since a partial FMU cannot be written to, data that a host wants to store in the non-volatile memory may sometimes need to be pre-padded and/or post-padded before the data is stored in the non-volatile memory, as explained in more detail below. The flash management units (FMUs) can also be referred to more specifically as logical flash management units (LFMUs), or more succinctly as logical units.
When a host device issues a write command to a storage device, the host device specifies an initial LBA at which to begin storing the data to be written in the flash (non-volatile) memory of the storage device. When the initial LBA is unaligned with a boundary of one of the FMUs, then a controller of the storage device may need to pre-pad the data (e.g., with dummy data) before the data to be written in response to the write command is stored within the non-volatile memory of the storage device. Further, when the end of the data to be written in response to the write command is unaligned with a boundary of one of the FMUs, then the controller of the storage device may need to post-pad the data (e.g., with dummy data) before the data to be written in response to the write command is stored within the non-volatile memory of the storage device.
In order to optimize read/write performance, and preferably minimize fragmentation and write amplification, the controller of the storage device classifies data that is being written into sequential data, which can also be referred to as a sequential stream, or random data, which can also be referred to as a random stream. Typically, relatively small and unaligned writes are classified as and stored as random data, whereas larger and aligned writes are classified and stored as sequential data.
A host device typically uses a file system, such as File Allocation Table 32 (FAT32), exFAT, ext2/3, and Hierarchical File System Plus (HFS+), or other known host file systems, to address files and store information about files in a storage device. Accordingly, a storage device will typically need to be capable of being used with various different types of file systems. This sometimes results in a storage device having poor write performance due to excessive pre-padding and/or post-padding of small chunks of data, and classifying and storing data as random data, even where a host was attempting to write a large continuous block of data.